(function(){var e=window.BX;e.namespace("BX.UI");if(!!e.UI.Selector.Search){return}e.UI.Selector.Search=function(e){this.selectorInstance=e.selectorInstance;this.selectorManager=this.selectorInstance.manager};e.UI.Selector.Search.create=function(t){return new e.UI.Selector.Search(t)};e.UI.Selector.Search.prototype.beforeSearchHandler=function(e){var t=this.selectorInstance.nodes.input,s=e.event;if(!t){return false}if(s.keyCode==8&&t.value.length<=0){this.selectorManager.statuses.allowSendEvent=false;this.selectorInstance.deleteLastItem()}else if(s.keyCode==13){this.selectorManager.statuses.searchStarted=true;s.stopPropagation();return s.preventDefault()}else if(s.keyCode==17||s.keyCode==224||s.keyCode==91||s.keyCode==93){s.stopPropagation();return s.preventDefault()}this.selectorManager.statuses.searchStarted=true;var n=this.selectorInstance.getNavigationInstance().keys;if(this.selectorInstance.isSearchOpen()&&(s.keyCode==n.up||s.keyCode==n.down||s.keyCode==n.left||s.keyCode==n.right)){s.stopPropagation();s.preventDefault();return false}return true};e.UI.Selector.Search.prototype.searchHandler=function(t){var s=this.selectorInstance.nodes.input,n=this.selectorInstance.nodes.tag,r=t.event;if(!s){return false}if(!this.selectorManager.statuses.searchStarted&&r.type!="paste"){return false}this.selectorManager.statuses.searchStarted=false;if(r.type!="paste"&&(r.keyCode==16||r.keyCode==17||r.keyCode==18||r.keyCode==20||r.keyCode==244||r.keyCode==224||r.keyCode==91||r.keyCode==93||r.keyCode==9)){return false}e.onCustomEvent("BX.UI.SelectorManager:beforeRunSearch",[{selectorInstance:this.selectorInstance}]);var i=null;if(this.selectorInstance.popups.search!=null){i="search"}else if(typeof r.keyCode!="undefined"&&e.util.in_array(r.keyCode,[37,38,39,40,13])&&e.util.in_array(this.selectorInstance.tabs.selected,["department"])){return true}else{i=this.selectorInstance.tabs.selected}if(typeof r.keyCode!="undefined"&&i){var a=this.selectorInstance.getNavigationInstance().checkKeyboardNavigation({keyCode:r.keyCode,tab:i});if(a=="space"){r.stopPropagation();r.preventDefault();return true}else if(a=="move"||a=="enter"){r.stopPropagation();r.preventDefault();return false}}var o="";if(r.keyCode==27){if(!this.selectorInstance.popups.inviteEmailUser||!this.selectorInstance.popups.inviteEmailUser.isShown()){s.value="";if(n){e.style(n,"display","inline")}if(this.selectorInstance.nodes.input){r.preventDefault()}}else{this.selectorInstance.popups.inviteEmailUser.close();return false}}else{o=this.selectorInstance.nodes.input.value;this.runSearch({text:o})}if(!this.selectorInstance.isDialogOpen()&&!e.type.isNotEmptyString(o)){this.selectorInstance.openDialog()}else{if(this.selectorManager.statuses.allowSendEvent&&this.selectorInstance.isDialogOpen()&&!this.selectorInstance.isContainerOpen){this.selectorInstance.closeDialog()}}if(r.keyCode==8){this.selectorManager.statuses.allowSendEvent=true}return true};e.UI.Selector.Search.prototype.runSearch=function(t){if(!t){t={}}var s=this.getOption("search"),n=e.type.isNotEmptyString(t.text)?e.util.trim(t.text):"",r=null;if(!e.type.isNotEmptyObject(s)){s={}}var i=e.type.isNotEmptyString(s.useAjax)&&s.useAjax=="Y"&&!this.selectorManager.extranetUser,a=this.getOption("userNameTemplate");if(e.type.isBoolean(t.sendAjax)){i=t.sendAjax}this.selectorInstance.cursors.search={firstItem:null,currentItem:null,position:{group:0,row:0,column:0}};if(!e.type.isNotEmptyString(n)){this.abortSearchRequest();if(this.selectorInstance.popups.search!=null){this.selectorInstance.popups.search.close()}return false}else{var o=0;var c=0;var l=0;var h=0;var I=null;var S=false;var p=false;var E=[];var u=false;var f=false;var y=null;var T=[n];var m=null;var d=[],N=false,C=null;var g=null;var R=null;var O=null;if(i){this.abortSearchRequest();var M={searchString:n};if(e.type.isNotEmptyString(s.useClientDatabase)&&s.useClientDatabase=="Y"){e.onCustomEvent("findEntityByName",[this.selectorManager,M,{},this.selectorInstance.clientDBSearchResult.users])}if(M.searchString!=n){T.push(M.searchString)}this.selectorInstance.resultChanged.search=false;this.selectorInstance.tmpSearchResult.ajax=[]}else{if(e.type.isNotEmptyString(t.textAjax)&&t.textAjax!=n){T.push(t.textAjax)}if(e.type.isNotEmptyObject(this.selectorInstance.entities.USERS)&&!e.type.isNotEmptyString(this.selectorInstance.getOption("scope","USERS"))&&this.selectorInstance.getOption("allowSearchNetwork","USERS")!="Y"){for(g=0;g<T.length;g++){m=T[g].toLowerCase();if(m.length>1&&e.type.isArray(this.selectorInstance.clientDBSearchResult.users[m])&&this.selectorInstance.clientDBSearchResult.users[m].length>0){e.onCustomEvent(e.UI.SelectorManager,"syncClientDb",[{selectorInstance:this.selectorInstance,clientDBData:this.selectorInstance.clientDBSearchResult.users[m],ajaxData:typeof this.selectorInstance.ajaxSearchResult.users[m]!="undefined"?this.selectorInstance.ajaxSearchResult.users[m]:[]}])}}}}if(i){this.selectorInstance.tmpSearchResult.client=[]}var b=null,U=null,w=null,v={};for(var j in this.selectorInstance.entities){if(!this.selectorInstance.entities.hasOwnProperty(j)){continue}b=this.selectorInstance.entities[j];I=true;d=[];v[j]={};if(this.selectorInstance.getOption("allowSelect",j)=="N"){continue}var k=null;for(g=0;g<T.length;g++){m=T[g].toLowerCase();if(i&&e.type.isNotEmptyObject(this.selectorInstance.clientDBSearchResult[j.toLowerCase()])&&e.type.isArray(this.selectorInstance.clientDBSearchResult[j.toLowerCase()][m])&&this.selectorInstance.clientDBSearchResult[j.toLowerCase()][m].length>0){for(R=0;R<this.selectorInstance.clientDBSearchResult[j.toLowerCase()][m].length;R++){if(j.toLowerCase()=="users"&&this.selectorInstance.getOption("allowSearchSelf",j)=="N"&&e.type.isNotEmptyObject(b.additionalData)&&e.type.isNotEmptyString(b.additionalData.PREFIX)&&this.selectorInstance.clientDBSearchResult[j.toLowerCase()][m][R]==b.additionalData.PREFIX+e.message("USER_ID")){continue}if(j.toLowerCase()=="users"&&e.type.isNotEmptyObject(this.selectorManager.obClientDbData[j.toLowerCase()])){U=this.selectorInstance.clientDBSearchResult[j.toLowerCase()][m][R];k=this.selectorInstance.getOption("scope",j);if(e.type.isNotEmptyObject(this.selectorManager.obClientDbData[j.toLowerCase()][U])&&(!e.type.isNotEmptyString(k)||k=="E"&&e.type.isNotEmptyString(this.selectorManager.obClientDbData[j.toLowerCase()][U]["isExtranet"])&&this.selectorManager.obClientDbData[j.toLowerCase()][U]["isExtranet"]=="Y"||k=="I"&&e.type.isNotEmptyString(this.selectorManager.obClientDbData[j.toLowerCase()][U]["isExtranet"])&&this.selectorManager.obClientDbData[j.toLowerCase()][U]["isExtranet"]!="Y")){if(!e.type.isNotEmptyObject(b.items)){b.items={}}b.items[U]=this.selectorManager.obClientDbData[j.toLowerCase()][U]}}}}}C="";for(U in b.items){if(!b.items.hasOwnProperty(U)||e.type.isNotEmptyString(b.items[U].searchable)&&b.items[U].searchable=="N"){continue}if(this.selectorInstance.itemsSelected[U]){continue}u=this.selectorInstance.getOption("searchById",j)=="Y"&&parseInt(m)==m&&b.items[U].entityId==m;if(!u){for(g=0;g<T.length;g++){u=false;m=T[g];y=m.toLowerCase().split(/\s+/);if(e.type.isNotEmptyString(b.items[U].index)){E=b.items[U].index.toLowerCase().split(/\s+/)}else{E=[]}if(e.type.isNotEmptyString(b.items[U].name)){E=E.concat(b.items[U].name.toLowerCase().split(/\s+/))}if(j.toLowerCase()==="mailContacts"&&b.items[U].email){E=E.concat(b.items[U].email.toLowerCase().split("@"))}for(O in E){if(E.hasOwnProperty(O)){E[O]=e.util.htmlspecialcharsback(E[O]);C=E[O].replace(/(["\(\)\xAB\xBB\u201C\u201D])/g,"");if(C.length!=E[O].length){E.push(C)}}}if(typeof b.items[U].email!="undefined"&&b.items[U].email&&b.items[U].email.length>0){E.push(b.items[U].email.toLowerCase())}if(typeof b.items[U].login!="undefined"&&b.items[U].login.length>0&&y.length<=1&&m.length>2){E.push(b.items[U].login.toLowerCase())}e.onCustomEvent(window,"SocNetLogDestinationSearchFillItemParts",[j,b.items[U],E]);if(y.length<=1){for(O in E){if(E.hasOwnProperty(O)&&m.toLowerCase().localeCompare(E[O].substring(0,m.length),"en-US",{sensitivity:"base"})===0){u=true;break}}}else{u=true;for(var L in y){if(!y.hasOwnProperty(L)){continue}f=false;for(O in E){if(E.hasOwnProperty(O)&&y[L].toLowerCase().localeCompare(E[O].substring(0,y[L].length),"en-US",{sensitivity:"base"})===0){f=true;break}}if(!f){u=false;break}}if(!u){continue}}if(u){break}}}if(!u){continue}if(I){if(typeof this.selectorInstance.result.search[c]!="undefined"){c++}I=false}N={value:U};if(e.type.isNotEmptyObject(this.selectorInstance.sortData[U])){N.sort=this.selectorInstance.sortData[U]}if(b.items[U].isNetwork=="Y"){N.isNetwork=true}if(i){this.selectorInstance.tmpSearchResult.client.push(R)}d.push(N)}this.selectorInstance.tmpSearchResult.client.filter(function(e,t,s){return t==s.indexOf(e)});d.sort(function(t,s){if(e.util.in_array(t.value,this.selectorInstance.tmpSearchResult.client)&&!e.util.in_array(s.value,this.selectorInstance.tmpSearchResult.client)){return-1}else if(typeof t.isNetwork=="undefined"&&typeof s.isNetwork!="undefined"){return-1}else if(typeof t.isNetwork!="undefined"&&typeof s.isNetwork=="undefined"){return 1}else if(typeof t.sort=="undefined"&&typeof s.sort=="undefined"){return 0}else if(typeof t.sort!="undefined"&&typeof s.sort=="undefined"){return-1}else if(typeof t.sort=="undefined"&&typeof s.sort!="undefined"){return 1}else{if(typeof t.sort.Y!="undefined"&&typeof s.sort.Y=="undefined"){return-1}else if(typeof t.sort.Y=="undefined"&&typeof s.sort.Y!="undefined"){return 1}else if(typeof t.sort.Y!="undefined"&&typeof s.sort.Y!="undefined"){if(parseInt(t.sort.Y)>parseInt(s.sort.Y)){return-1}else if(parseInt(t.sort.Y)<parseInt(s.sort.Y)){return 1}else{return 0}}else{if(parseInt(t.sort.N)>parseInt(s.sort.N)){return-1}else if(parseInt(t.sort.N)<parseInt(s.sort.N)){return 1}else{return 0}}}}.bind(this));var x=0;for(g=0;g<d.length;g++){U=d[g].value;v[j][U]=U;x++;p=false;if(b.items[U].id=="UA"){p=true}else{if(!e.type.isArray(this.selectorInstance.result.search[c])){this.selectorInstance.result.search[c]=[];l=0;h=0}if(h==2){l++;h=0}if(!e.type.isArray(this.selectorInstance.result.search[c][l])){this.selectorInstance.result.search[c][l]=[];h=0}}w=e.clone(b.items[U]);if(p){S=w}w.type=j;if(!p){if(S){this.selectorInstance.result.search[c][l][h]=S;S=false;h++}this.selectorInstance.result.search[c][l][h]=w}if(o<=0){this.selectorInstance.cursors.search.firstItem=w;this.selectorInstance.cursors.search.currentItem=w}o++;h++}}if(i){if(this.selectorInstance.popups.search!=null){if(e(this.selectorInstance.nodes.searchContent)){e.cleanNode(this.selectorInstance.nodes.searchContent);r=this.selectorInstance.buildContentCollection({type:"search",items:v});for(R=0;R<r.length;R++){this.selectorInstance.nodes.searchContent.appendChild(r[R])}}}else{this.selectorInstance.openSearch({itemsList:v})}}else{if(o<=0){if(this.selectorInstance.popups.search){if(this.selectorInstance.getOption("allowSearchNetwork","USERS")!="Y"){this.selectorInstance.closeByEmptySearchResult=true;this.selectorInstance.popups.search.destroy()}}else if(this.getOption("useContainer")=="Y"&&this.selectorInstance.nodes.contentWaiter){this.selectorInstance.nodes.contentWaiter.innerHTML=e.message("MAIN_UI_SELECTOR_STUB_EMPTY_LIST")}}else{if(this.selectorInstance.popups.search!=null&&this.selectorInstance.popups.search.isShown()){if(e(this.selectorInstance.nodes.searchContent)){e.cleanNode(this.selectorInstance.nodes.searchContent);r=this.selectorInstance.buildContentCollection({type:"search",items:v});for(R=0;R<r.length;R++){this.selectorInstance.nodes.searchContent.appendChild(r[R])}}}else{if(this.selectorInstance.popups.search!=null){this.selectorInstance.popups.search.destroy()}this.selectorInstance.openSearch({itemsList:v})}}}if(this.selectorInstance.popups.container){this.selectorInstance.popups.container.adjustPosition()}else if(this.selectorInstance.popups.search){this.selectorInstance.popups.search.adjustPosition()}if(o>0){this.selectorInstance.getNavigationInstance().hoverFirstItem({tab:"search"})}clearTimeout(this.selectorInstance.timeouts.search);if(i&&n.toLowerCase()!=""){this.showSearchWaiter();this.searchRequest({text:n})}}};e.UI.Selector.Search.prototype.searchRequest=function(t){var s=t.text;if(this.selectorInstance.postponeSearch){this.selectorInstance.timeouts.postponeSearch=setTimeout(function(){this.searchRequest({text:s})}.bind(this),100);return}e.onCustomEvent("BX.UI.SelectorManager:searchRequest",[{selectorInstance:this.selectorInstance,additionalData:this.selectorInstance.getAdditionalEntitiesData(),callback:{success:this.searchRequestCallbackSuccess.bind(this),failure:this.searchRequestCallbackFailure.bind(this)},searchStringOriginal:s,searchString:s.toLowerCase()}])};e.UI.Selector.Search.prototype.searchRequestCallbackSuccess=function(t,s){var n=null,r=this.getOption("search"),i=e.type.isNotEmptyString(s.searchString)?e.util.trim(s.searchString):"",a=false;if(!e.type.isNotEmptyObject(r)){r={}}this.hideSearchWaiter();if(t){var o=e.type.isNotEmptyObject(t.ENTITIES)&&e.type.isNotEmptyObject(t.ENTITIES.USERS)&&e.type.isNotEmptyString(t.ENTITIES.USERS.SEARCH)?t.ENTITIES.USERS.SEARCH:s.searchString;var c=e.clone(t);if(e.type.isNotEmptyObject(c.ENTITIES.USERS)&&e.type.isNotEmptyObject(c.ENTITIES.USERS.ITEMS)){for(n in c.ENTITIES.USERS.ITEMS){if(c.ENTITIES.USERS.ITEMS.hasOwnProperty(n)&&(e.type.isNotEmptyString(c.ENTITIES.USERS.ITEMS[n].active)&&c.ENTITIES.USERS.ITEMS[n].active=="N"||e.type.isNotEmptyString(c.ENTITIES.USERS.ITEMS[n].isNetwork)&&c.ENTITIES.USERS.ITEMS[n].isNetwork=="Y"||e.type.isNotEmptyString(c.ENTITIES.USERS.ITEMS[n].isEmail)&&c.ENTITIES.USERS.ITEMS[n].isEmail=="Y")){delete c.ENTITIES.USERS.ITEMS[n]}}if(e.type.isNotEmptyString(r.useClientDatabase)&&r.useClientDatabase=="Y"){e.onCustomEvent(e.UI.SelectorManager,"onFinderAjaxSuccess",[c.ENTITIES.USERS.ITEMS,e.UI.SelectorManager,"users"])}}if(!this.selectorInstance.resultChanged.search){if(!e.type.isNotEmptyObject(this.selectorInstance.ajaxSearchResult.users)||!this.selectorInstance.ajaxSearchResult.users[o.toLowerCase()]){this.selectorInstance.ajaxSearchResult.users={};this.selectorInstance.ajaxSearchResult.users[o.toLowerCase()]=[]}if(e.type.isNotEmptyObject(t.ENTITIES)){for(var l in t.ENTITIES){if(!t.ENTITIES.hasOwnProperty(l)){continue}if(e.type.isNotEmptyObject(t.ENTITIES[l])&&e.type.isNotEmptyObject(t.ENTITIES[l].ITEMS)){for(n in t.ENTITIES[l].ITEMS){if(!t.ENTITIES[l].ITEMS.hasOwnProperty(n)){continue}a=true;break}}if(a){break}}if(e.type.isNotEmptyObject(t.ENTITIES.USERS)&&e.type.isNotEmptyObject(t.ENTITIES.USERS.ITEMS)){for(n in t.ENTITIES.USERS.ITEMS){if(!t.ENTITIES.USERS.ITEMS.hasOwnProperty(n)){continue}this.selectorInstance.ajaxSearchResult.users[o.toLowerCase()].push(n);if(typeof t.ENTITIES.USERS.ITEMS[n].isNetwork!="undefined"&&t.ENTITIES.USERS.ITEMS[n].isNetwork=="Y"){this.selectorInstance.networkItems[n]=t.ENTITIES.USERS.ITEMS[n];this.selectorInstance.tmpSearchResult.ajax.push(n)}else{if(e.type.isNotEmptyString(t.ENTITIES.USERS.ITEMS[n].isCrmEmail)&&t.ENTITIES.USERS.ITEMS[n].isCrmEmail=="Y"&&this.selectorInstance.getOption("allowSearchCrmEmailUsers")=="Y"&&e.type.isNotEmptyObject(this.selectorInstance.entities.CRMEMAILUSERS)){this.selectorInstance.entities.CRMEMAILUSERS.items[n]=t.ENTITIES.USERS.ITEMS[n]}else if(e.type.isNotEmptyString(t.ENTITIES.USERS.ITEMS[n].isEmail)&&t.ENTITIES.USERS.ITEMS[n].isEmail=="Y"&&e.type.isNotEmptyObject(this.selectorInstance.entities.EMAILUSERS)){this.selectorInstance.entities.EMAILUSERS.items[n]=t.ENTITIES.USERS.ITEMS[n]}else{this.selectorInstance.entities.USERS.items[n]=t.ENTITIES.USERS.ITEMS[n]}this.selectorInstance.tmpSearchResult.ajax.push(n)}}}if(e.type.isNotEmptyObject(t.ENTITIES.CRMEMAILUSERS)&&e.type.isNotEmptyObject(t.ENTITIES.CRMEMAILUSERS.ITEMS)){for(n in t.ENTITIES.CRMEMAILUSERS.ITEMS){if(!t.ENTITIES.CRMEMAILUSERS.ITEMS.hasOwnProperty(n)){continue}this.selectorInstance.entities.CRMEMAILUSERS.items[n]=t.ENTITIES.CRMEMAILUSERS.ITEMS[n];this.selectorInstance.tmpSearchResult.ajax.push(n)}}if(e.type.isNotEmptyObject(t.ENTITIES.SONETGROUPS)&&e.type.isNotEmptyObject(t.ENTITIES.SONETGROUPS.ITEMS)){for(n in t.ENTITIES.SONETGROUPS.ITEMS){if(!t.ENTITIES.SONETGROUPS.ITEMS.hasOwnProperty(n)){continue}if(!this.selectorInstance.entities.SONETGROUPS.items.hasOwnProperty(n)){this.selectorInstance.entities.SONETGROUPS.items[n]=t.ENTITIES.SONETGROUPS.ITEMS[n]}}}}var h={found:a,itemCodeList:[]};e.onCustomEvent("BX.UI.Selector:onSearchRequestCallbackSussess",[{selector:this.selectorInstance,responseData:t,eventResult:h}]);a=h.found;for(var I=0;I<h.itemCodeList.length;I++){this.selectorInstance.tmpSearchResult.ajax.push(h.itemCodeList[I])}if(!a){e.onCustomEvent("BX.UI.Selector:onEmptySearchResult",[{selectorId:this.selectorInstance.id,searchString:i,searchStringOriginal:e.type.isNotEmptyString(s.searchStringOriginal)?s.searchStringOriginal:i}])}if(e.type.isNotEmptyObject(t.ENTITIES)){if(e.type.isNotEmptyObject(t.ENTITIES.SONETGROUPS)&&e.type.isNotEmptyObject(t.ENTITIES.SONETGROUPS.ITEMS)){for(n in t.ENTITIES.SONETGROUPS.ITEMS){if(!t.ENTITIES.SONETGROUPS.ITEMS.hasOwnProperty(n)){continue}a=true;this.selectorInstance.entities.SONETGROUPS.items[n]=t.ENTITIES.SONETGROUPS.ITEMS[n];this.selectorInstance.tmpSearchResult.ajax.push(n)}}if(e.type.isNotEmptyObject(t.ENTITIES.PROJECTS)&&e.type.isNotEmptyObject(t.ENTITIES.PROJECTS.ITEMS)){for(n in t.ENTITIES.PROJECTS.ITEMS){if(!t.ENTITIES.PROJECTS.ITEMS.hasOwnProperty(n)){continue}a=true;this.selectorInstance.entities.PROJECTS.items[n]=t.ENTITIES.PROJECTS.ITEMS[n];this.selectorInstance.tmpSearchResult.ajax.push(n)}}if(e.type.isNotEmptyObject(t.ENTITIES.MAILCONTACTS)&&e.type.isNotEmptyObject(t.ENTITIES.MAILCONTACTS.ITEMS)){for(n in t.ENTITIES.MAILCONTACTS.ITEMS){if(!t.ENTITIES.MAILCONTACTS.ITEMS.hasOwnProperty(n)){continue}a=true;this.selectorInstance.entities.MAILCONTACTS.items[n]=t.ENTITIES.MAILCONTACTS.ITEMS[n];this.selectorInstance.tmpSearchResult.ajax.push(n)}}}this.selectorInstance.tmpSearchResult.ajax.filter(function(e,t,s){return t==s.indexOf(e)});this.runSearch({text:i,sendAjax:false,textAjax:o})}}};e.UI.Selector.Search.prototype.searchRequestCallbackFailure=function(e){this.hideSearchWaiter()};e.UI.Selector.Search.prototype.abortSearchRequest=function(){if(this.selectorInstance.searchXhr){this.selectorInstance.searchXhr.abort()}if(this.selectorInstance.searchRequestId){this.selectorInstance.searchRequestId=null}if(this.selectorInstance.timeouts.search){clearTimeout(this.selectorInstance.timeouts.search)}if(this.selectorInstance.timeouts.postponeSearch){clearTimeout(this.selectorInstance.timeouts.postponeSearch)}this.hideSearchWaiter()};e.UI.Selector.Search.prototype.buildSearchWaiter=function(){this.selectorInstance.nodes.searchWaiter=e.create("DIV",{props:{className:this.selectorInstance.getRenderInstance().class.searchWaiter},style:{height:"0px"},children:[e.create("IMG",{props:{className:this.selectorInstance.getRenderInstance().class.searchWaiterBackground},attrs:{src:"/bitrix/js/main/core/images/waiter-white.gif"}}),e.create("DIV",{props:{className:this.selectorInstance.getRenderInstance().class.searchWaiterText},text:e.message("MAIN_UI_SELECTOR_WAITER_TEXT")})]});return this.selectorInstance.nodes.searchWaiter};e.UI.Selector.Search.prototype.showSearchWaiter=function(){if(!this.selectorInstance.statuses.searchWaiterEnabled&&this.selectorInstance.nodes.searchContentsContainer){if(e.pos(this.selectorInstance.nodes.searchContentsContainer).height>0){this.selectorInstance.statuses.searchWaiterEnabled=true;var t=0;var s=40;this.animateSearchWaiter(t,s)}}};e.UI.Selector.Search.prototype.hideSearchWaiter=function(){if(this.selectorInstance.statuses.searchWaiterEnabled){this.selectorInstance.statuses.searchWaiterEnabled=false;var e=40;var t=0;this.animateSearchWaiter(e,t)}};e.UI.Selector.Search.prototype.animateSearchWaiter=function(t,s){if(this.selectorInstance.nodes.searchWaiter){new e.fx({time:.5,step:.05,type:"linear",start:t,finish:s,callback:e.delegate(function(e){if(this){this.waiterBlock.style.height=e+"px"}},{waiterBlock:this.selectorInstance.nodes.searchWaiter}),callback_complete:function(){}}).start()}};e.UI.Selector.Search.prototype.getOption=function(e){return this.selectorInstance.getOption(e)}})();
//# sourceMappingURL=search.map.js